from django.contrib import admin
from .models import SparkCard
from Spark.second_admin import admin_site
# Register your models here.


@admin.register(SparkCard, site=admin_site)
class SparkCardAdmin(admin.ModelAdmin):
    list_display = ('title', 'spark_content', 'like', 'comments', 'owner', 'status', 'created_time')
    fields = ('title', 'spark_content', 'like', 'owner', 'status')
    search_fields = ('title', 'owner__user_name')
    # 如果是跨表搜索， 则用这个